<template>
  <el-card>
    <el-form :model="fff" label-width="120px" :rules="rules">
      <el-form-item label="上传图片">
        <div class="images">
          <img src="" alt="" />
        </div>
      </el-form-item>
      <el-form-item label="商品名称">
        <el-input v-model="fff.name" />
      </el-form-item>
      <el-form-item label="价格货号">
        <el-input v-model="fff.name" />
      </el-form-item>
      <el-form-item label="标签">
        <template #default="scope" key="scope.row.id">
          <span>上架：<el-switch :model-value="true" /></span>
          <br />
          <span>新品：<el-switch :model-value="true" /></span>
          <br />
          <span>推荐：<el-switch :model-value="true" /></span>
        </template>
      </el-form-item>
    </el-form>
  </el-card>
</template>

<script setup lang="ts">
import { ref, reactive } from "vue";
import type { FormRules } from "element-plus";
import { useRoute, useRouter } from "vue-router";

const router = useRouter();

let fff = reactive({
  name: "asd",
});

let form = reactive({});

const rules = reactive<FormRules>({
  name: [
    { required: true, message: "Please input Activity name", trigger: "blur" },
    { min: 3, max: 5, message: "Length should be 3 to 5", trigger: "blur" },
  ],
});
</script>

<style lang="scss" scoped>
.el-card {
  margin: 0 auto;
  width: 792px;
  box-sizing: border-box;
  padding: 35px 35px 15px;
}
</style>
